import {getServerSession} from "@/server/auth";
import {redirect} from "next/navigation";

export default async function DashboardLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
    const session = await getServerSession()
    console.log(session,"-->server")
    if(!session?.user) redirect("/api/auth/signin")
  return children;
}
